
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 商机列表
export function getChanceList(params) {
  return request({
    url: host + '/business-chance/list',
    method: 'get',
    params
  })
}

// 新增商机
export function addChance(data) {
  return request({
    url: host + '/business-chance/save',
    method: 'post',
    data
  })
}

// 新增商机
export function updateChance(data) {
  return request({
    url: host + '/business-chance/update',
    method: 'post',
    data
  })
}

// 获取商机
export function getChance(params) {
  return request({
    url: host + '/business-chance/detail',
    method: 'get',
    params
  })
}

// 删除商机
export function deleteChance(data) {
  return request({
    url: host + '/business-chance/delete',
    method: 'post',
    data
  })
}
// /business-chance/updateSaleStage
export function updateSaleStage(data) {
  return request({
    url: host + '/business-chance/updateSaleStage',
    method: 'post',
    data
  })
}

// customer​/dropDown
export function getChanceSelect(params) {
  return request({
    url: host + '/business-chance/dropDown',
    method: 'get',
    params
  })
}
